//
//  MobileZIPCodesApp.m
//  MobileZIPCodes
//
//  Created by Andreas Schwelling on 23.11.07.
//	http://www.andi.de/zipcodes/
//
//  Released under the GNU General Public License.
//  See LICENSE for details.
//
//  Use at your own risk.
//

#import "MobileZIPCodesApp.h"

@implementation MobileZIPCodesApp


static MobileZIPCodesApp *sharedInstance;

+ (MobileZIPCodesApp *)sharedInstance
{
	if (!sharedInstance) {
		sharedInstance = [[MobileZIPCodesApp alloc] init];
		//NSLog(@"sharedInstance: creating new inst");
	}
	
	//NSLog(@"returning sharedinst");
	return sharedInstance;
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
	
	sharedInstance = self;
	
	struct CGRect rect = [UIHardware fullScreenApplicationContentRect];
	rect.origin.x = rect.origin.y = 0.0f;
	
	_window = [ [ UIWindow alloc ] initWithContentRect: rect ];
	
	_mainView = [ [ MainView alloc ] initWithFrame: rect ];
	
	[ _window setContentView: _mainView ];
	[ _window orderFront: self ];
	[ _window makeKey: self ];
	[ _window _setHidden: NO ];
}

@end
